from tortoise import fields
from tortoise.models import Model

from utils.field import TimeIntField


class Plan(Model):
    plan_id = fields.IntField(null=False, description="方案编号")
    stage = fields.IntField(null=False, description="阶段")
    phase = fields.IntField(null=False, description="相位")
    green_time = TimeIntField(null=False, description="绿灯时间")
    yellow_time = TimeIntField(null=False, description="黄灯时间")
    red_time = TimeIntField(null=False, description="红灯时间")
